header
 
Untitled Document
Course: CSC204
   
- Basic OS Theory
- OS – User View
- OS – System View
- DOS
- Linux
- Windows
1
 
Free Online Tutorial ::
To be a center of structured knowledge for all. All instructors are welcome to participate in this knowledge distribution.
 
 
Courses:CSC204
CSC204, 1.1 Understanding OS
 
1.1.1 What is an Operating System?
What is an Operating System?

A program that acts as an intermediary between a user of a computer and the computer hardware Operating system goals: Execute user programs and make solving user problems easier Make the computer system convenient to use Use the computer hardware in an efficient manner

Computer System Structure Computer system can be divided into four components Hardware – provides basic computing resources. CPU, memory, I/O devices Operating system. Controls and coordinates use of hardware among various applications and users Application programs – define the ways in which the system resources are used to solve the computing problems of the users. Word processors, compilers, web browsers, database systems, video games Users. People, machines, other computers

Operating System Definition OS is a resource allocator Manages all resources Decides between conflicting requests for efficient and fair resource use OS is a control program Controls execution of programs to prevent errors and improper use of the computer No universally accepted definition “Everything a vendor ships when you order an operating system” is good approximation But varies wildly “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program Computer Startup bootstrap program is loaded at power-up or reboot Typically stored in ROM or EPROM, generally known as firmware Initializes all aspects of system Loads operating system kernel and starts execution
 
CSC204, 1.1 Understanding OS
 
1.1.1 What is OS?
What is OS?

What is an Operating System?

A program that acts as an intermediary between a user of a computer and the computer hardware
Operating system goals:
Execute user programs and make solving user problems easier
Make the computer system convenient to use
Use the computer hardware in an efficient manner

Computer System Structure

Computer system can be divided into four components
Hardware – provides basic computing resources. CPU, memory, I/O devices
Operating system. Controls and coordinates use of hardware among various applications and users
Application programs – define the ways in which the system resources are used to solve the computing problems of the users. Word processors, compilers, web browsers, database systems, video games
Users. People, machines, other computers

Operating System Definition

OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair resource use
OS is a control program
Controls execution of programs to prevent errors and improper use of the computer

No universally accepted definition
“Everything a vendor ships when you order an operating system” is good approximation
But varies wildly
“The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program

Computer Startup
bootstrap program is loaded at power-up or reboot
Typically stored in ROM or EPROM, generally known as firmware
Initializes all aspects of system
Loads operating system kernel and starts execution
 
CSC204, 1.1 Understanding OS
 
1.1.2 OS and Computer System
OS and Computer System
 
CSC204, 1.1 Understanding OS
 
1.1.3 History of OS
History of OS

HISTORY OF OPERATING SYSTEMS DEVELOPMENT

FIRST GENERATION 1945-1955

Vacuum tubes & wires plug boards technology
Plug boards replaced with punch cards
ENIAC – first commercial computer system
Use 18K vacuum tubes
OS ?
NONE !

SECOND GENERATION 1955-1965

Transistors technology
IBM 701 mainframe
OS ?
1st OS - JCL (Job Control Language)
Batch processing – collection of source program, data & controls to compile & run a particular task
SPOOL - Simultaneous Peripheral Operations On-Line
Single-stream processing
One-at-a-time, start to end!

THIRD GENERATION 1965-1980

Integrated circuit technology
IBM System/360 & DEC PDPs minicomputer
OS ?
Multiprogramming/timesharing system
Virtual memory, spooling
Single-stream processing
One-at-a-time, start to end!

FOURTH GENERATION 1980-PRESENT

Very-Large-Scale-Integration (VLSI) technology
Personal computer (PC) & workstations
Internet
Open system
Open Source

OS
Network Operating Systems
Novell Netware, MS LANManager/Windows
Server Operating Systems
Offer services like print, file, application or web
UNIX, Windows, Linux
Multiprocessor Operating Systems
Parallel computing, Grid Computing
Personal Operating Systems
Single user with GUI
Windows XP/Vista, MacOS X, Linux

Phase 1: Hardware - computers are expensive
Goal: Use computer’s time efficiently
Maximize job throughput (i.e. jobs per second)
Maximize machine utilization (i.e. percentage busy)
Phase 2: Peopleware - computers are inexpensive
Goal: Use people’s time efficiently
Maximize process thoughput (i.e. several applications runs simultaneously)
Minimize response time (i.e. concurrent processes)
 
CSC204, 1.1 Understanding OS
 
1.1.4 Types of OS
Types of OS

OPERATING SYSTEMS TYPES

Mainframe operating systems
Used in corporate data centers', typically have huge i/o capabilities
IBM OS/390
Services provided:
Batch – routine jobs with no user interaction (utility bill processing)
Transaction processing – small but numerous tasks (cheque processing, reservations systems)
Timesharing – multiple remote on-line users (database queries)

Server/Network operating systems
Systems that provide high-speed services over a network.
Example file/print server, web services
Novell Netware, Microsoft Windows, Linux
Personal computer operating systems
Single user with good GUI
Microsoft Windows XP/Vista, MacOS X, Linux

Real-time operating systems
Used in industrial process control systems where timing is critical
“hard” real time – action must occur at precisely some instant; e.g. robot welder, autopilot
“soft” real time – missing an occasional deadline is OK; e.g. digital audio/multimedia
VxWorks, QNX, RT-Linux

Embedded operating systems
Used in PDAs, Smartphones and consumers electronics; e.g. TVs, set-top boxes, microwaves, etc
PalmOS, Symbian, Windows Mobile
Smartcard operating systems
Extreme primitive OS running on credit card sized devices with a CPU
Java Virtual Machine (JVM)

Middleware
Software that links 2 separate apps on heterogeneous systems via networks; e.g. Web Services
Multiprocessing
Multiple processors in same machine; e.g. SMP
Concurrent programming
Concurrent C, Java – parallel computations/threads
API standardization
POSIX – Portable Operating System Interface


OS Components

Processor Manager decides how to allocate the central processing unit (CPU)
Processor Manager has two levels of responsibility:
To handle jobs as they enter the system
Handled by Job Scheduler
To manage each process within those jobs
Handled by Process Scheduler

Memory Manager: In charge of main memory (RAM)
Responsibility includes:
Preserves the space in main memory occupied by the operating system
Checks the validity of each request for memory space
Sets up a table to keep track of who is using which section of memory in a multiuser environment
Deallocates memory when the time comes to reclaim the memory

Device Manager monitors every device, channel, and control unit
Responsibility includes:
Chooses the most efficient way to allocate all of the system’s devices, printers, terminals, disk drives, based on a scheduling policy
Makes the allocation, starts its operation
Deallocates the device

File Manager keeps track of every file in the system including data files, assemblers, compilers, and application programs
Responsibility includes:
Enforces restrictions on who has access to which files by using predetermined access
Controls what users are allowed to do with files once they access them
Allocates the resource by opening the file and deallocates it by closing the file

Operating systems with networking capability have a fifth essential manager called the Network Manager
Network Manager provides a convenient way for users to share resources while controlling users’ access to them. The resources include:
Hardware (such as CPUs, memory areas, printers, tape drives, modems, and disk drives)
Software (such as compilers, application programs, and data files)

To be more efficient, each of the subsystem manager must perform the following tasks:
Monitor its resources continuously
Enforce the policies that determine who gets what, when, and how much
Allocate the resource when it’s appropriate
Deallocate the resource when appropriate

Essential managers of an operating system:
Processor Manager
Memory Manager
Device Manager
File Manager
Network Manager
Each manager both works closely with the other managers and performs its unique role – Interprocess Communication Manager
User Command Interface is unique to each operating system

OS is a resource allocator
Processor ManageManages all resources
Decides between conflicting requests for efficient and fair resource use
OS is a control program
Controls execution of programs to prevent errors and improper use of the computer



 
CSC204, 1.1 Understanding OS
 
File-System Interface
File-System Interface
n File Concept
n Access Methods
n Directory Structure
n File System Mounting
n File Sharing
n Protection

File Concept
n Contiguous logical address space
n Types:
F Data
4 numeric
4 character
4 binary
F Program


File Structure
n None - sequence of words, bytes
n Simple record structure
F Lines
F Fixed length
F Variable length
n Complex Structures
F Formatted document
F Relocatable load file
n Can simulate last two with first method by inserting
appropriate control characters.
n Who decides:
F Operating system
F Program

File Attributes
n Name – only information kept in human-readable form.
n Type – needed for systems that support different types.
n Location – pointer to file location on device.
n Size – current file size.
n Protection – controls who can do reading, writing,
executing.
n Time, date, and user identification – data for protection,
security, and usage monitoring.
n Information about files are kept in the directory structure,
which is maintained on the disk.

File Operations
n Create
n Write
n Read
n Reposition within file – file seek
n Delete
n Truncate
n Open(Fi) – search the directory structure on disk for entry
Fi, and move the content of entry to memory.
n Close (Fi) – move the content of entry Fi in memory to
directory structure on disk.

File Types – Name, Extension

Access Methods
n Sequential Access
read next
write next
reset
no read after last write
(rewrite)
n Direct Access
read n
write n
position to n
read next
write next
rewrite n
n = relative block number
Operating System Concepts 11.8 Silberschatz, Galvin and Gagne Ó2002
Sequential-access File
Operating System Concepts 11.9 Silberschatz, Galvin and Gagne Ó2002
Simulation of Sequential Access on a Direct-access File
4
Operating System Concepts 11.10 Silberschatz, Galvin and Gagne Ó2002
Example of Index and Relative Files
Operating System Concepts 11.11 Silberschatz, Galvin and Gagne Ó2002
Directory Structure
n A collection of nodes containing information about all
files.
F 1 F 2
F 3
F 4
F n
Directory
Files
Both the directory structure and the files reside on disk.
Backups of these two structures are kept on tapes.
Operating System Concepts 11.12 Silberschatz, Galvin and Gagne Ó2002
A Typical File-system Organization

Information in a Device Directory
n Name
n Type
n Address
n Current length
n Maximum length
n Date last accessed (for archival)
n Date last updated (for dump)
n Owner ID (who pays)
n Protection information (discuss later)

Operations Performed on Directory
n Search for a file
n Create a file
n Delete a file
n List a directory
n Rename a file
n Traverse the file system

Organize the Directory (Logically) to Obtain
n Efficiency– locating a file quickly.
n Naming – convenient to users.
F Two users can have same name for different files.
F The same file can have several different names.
n Grouping – logical grouping of files by properties, (e.g.,
all Java programs, all games, …)

Single-Level Directory
n A single directory for all users.
Naming problem
Grouping problem

Two-Level Directory
n Separate directory for each user.
•Path name
•Can have the same file name for different user
•Efficient searching
•No grouping capability

Tree-Structured Directories

Tree-Structured Directories (Cont.)
n Efficient searching
n Grouping Capability
n Current directory (working directory)
F cd /spell/mail/prog
F type list

Tree-Structured Directories (Cont.)
n Absoluteor relativepath name
n Creating a new file is done in current directory.
n Delete a file
rm <file-name>
n Creating a new subdirectory is done in current directory.
mkdir <dir-name>
Example: if in current directory /mail
mkdir count
mail
prog copy prt exp count
Deleting “mail” Þ deleting the entire subtree rooted by “mail”.

Acyclic-Graph Directories
n Have shared subdirectories and files.

Acyclic-Graph Directories (Cont.)
n Two different names (aliasing)
n If dict deletes list Þ dangling pointer.
Solutions:
F Backpointers, so we can delete all pointers.
Variable size records a problem.
F Backpointers using a daisy chain organization.
F Entry-hold-count solution.

General Graph Directory

General Graph Directory (Cont.)
n How do we guarantee no cycles?
F Allow only links to file not subdirectories.
F Garbage collection.
F Every time a new link is added use a cycle detection
algorithm to determine whether it is OK.

File System Mounting
n A file system must be mounted before it can be
accessed.
n A unmounted file system (I.e. Fig. 11-11(b)) is mounted at
a mount point.

(a) Existing. (b) Unmounted Partition

Mount Point

File Sharing
n Sharing of files on multi-user systems is desirable.
n Sharing may be done through a protection scheme.
n On distributed systems, files may be shared across a
network.
n Network File System (NFS) is a common distributed filesharing
method.

Protection
n File owner/creator should be able to control:
F what can be done
F by whom
n Types of access
F Read
F Write
F Execute
F Append
F Delete
F List

Access Lists and Groups
n Mode of access: read, write, execute
n Three classes of users
RWX
a) owner access 7 Þ 1 1 1
RWX
b) group access 6 Þ 1 1 0
RWX
c) public access 1 Þ 0 0 1
n Ask manager to create a group (unique name), say G,
and add some users to the group.
n For a particular file (say game) or subdirectory, define an
appropriate access.
owner group public
chmod 761 game
Attach a group to a file
chgrp G game
 
CSC204, 1.1 Understanding OS
 
Figures
Figure1



Figure2



Figure3



Figure4



 
 
 
 
 
Untitled Document
Unlimited calls
Click here

Law firm System
Klik sini
http://www.lawmais.com/secure/images/lawmais.png
Dakwah tanggugjawab kita
Nabi menangis mengenangkan umatnya. Kasihanilah mereka yang masih tidak dapat mengenal Allah. Bantulah mereka....



Tadarus Hafazan
Tadarus Hafazan Sudah bermula. Sila hubungi admin jika ingin menyertai. Yuran adalah percuma. Klik sini untuk maklumat lanjut


 
 
Untitled Document
Copyright © 2010 roslanjam@yahoo.com. All Rights Reserved.
Guest online: 1